<?php echo form_fieldset('Cataporte');?>
<table border=0 align="center">        
<?php	
	echo form_hidden(array('name'=>'base_url','id' => 'base_url','value' =>base_url()));
	 echo form_open('cataporte_controller/guardar_cataporte',$attributes= array('name' => "formCataporte"));
?>	 
	<tr>
		<td colspan="2"><?php echo $this->session->flashdata('fecha_no_existe');?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Fecha de la Venta:', 'lbl_fecha_venta');?></td>	
		<td><?php echo form_input(array('name' =>'fecha_venta','size' => '10','class' => 'input','readOnly'=>'true','id'=>'fecha_venta','value'=>set_value('fecha_venta'))) ?>
		 <?php $img = img(array('src'=>'/imagenes/boton_date.png', 'valign'=>'middle' ));?>		
		<?php echo anchor('', $img,array('id'=>'calendario_venta')); ?>
		<td><?php echo form_error('fecha_venta', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('N&uacute;mero de cataporte:', 'lbl_nro_cataporte');?></td>	
		<td><?php echo form_input('nro_cataporte',set_value('nro_cataporte'))?></td>
		<td><?php echo form_error('nro_cataporte', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('N&uacute;mero de dep&oacutesito:', 'lbl_nro_deposito');?></td>	
		<td><?php echo form_input(array('name' => 'nro_deposito','value' => set_value('nro_deposito'))) ?></td>
		<td><?php echo form_error('nro_deposito', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Monto:', 'lbl_monto');?></td>	
		<td><?php echo form_input('monto',set_value('monto')) ?></td>
		<td><?php echo form_error('monto', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Fecha:', 'lbl_fecha');?></td>	
		<td><?php echo form_input(array('name' =>'fecha','size' => '10','class' => 'input','readOnly'=>'true','id'=>'fecha','value'=>set_value('fecha'))) ?>
		 <?php $img = img(array('src'=>'/imagenes/boton_date.png', 'valign'=>'middle' ));?>		
		<?php echo anchor('', $img,array('id'=>'calendario')); ?>
		<td><?php echo form_error('fecha', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td colspan="2" align="right"><?php echo form_submit(array('name'=> 'btn_guardar','value'=>'Guardar','class'=>'Boton')) ?>
		<?php echo form_reset(array('name'=> 'btn_cancelar','value'=>'Cancelar','class'=>'Boton'))?></td>
	</tr>			
  		<script type="text/javascript">
  			function dateChanged(calendar) {
    			if (calendar.dateClicked) {
      			var y = calendar.date.getFullYear();
      			var m = calendar.date.getMonth();
      			var d = calendar.date.getDate();
      			window.location = "#";
    			}
  			};  
  
  			Calendar.setup(
    			{
      				inputField  : "fecha",
      				ifFormat    : "%d/%m/%Y",
      				button      : "calendario"
    			}
  			);

  			Calendar.setup(
  	    			{
  	      				inputField  : "fecha_venta",
  	      				ifFormat    : "%d/%m/%Y",
  	      				button      : "calendario_venta"
  	    			}
  	  			);
  
		</script>
	
	<?php echo  form_close();?>

</table>
<?php echo form_fieldset_close(); ?>
